package com.flurry.android;

import android.util.Log;
import com.flurry.android.responses.AppCloudError;
import com.flurry.android.responses.AppCloudGetObjectByIDResponseHandler;
import org.json.JSONArray;
import org.json.JSONObject;

final class bn
  implements AppCloudResponseHandler
{
  bn(AppCloudGetObjectByIDResponseHandler paramAppCloudGetObjectByIDResponseHandler)
  {
  }

  public final void handleResponse(AppCloudResponse paramAppCloudResponse)
    throws Exception
  {
    if ((paramAppCloudResponse != null) && (this.dH != null))
    {
      if (paramAppCloudResponse.isSuccessful())
      {
        AppCloudObject localAppCloudObject = new AppCloudObject(paramAppCloudResponse.getResponse().getJSONArray("set").getJSONObject(0));
        this.dH.onOperationSucceed(localAppCloudObject);
        return;
      }
      this.dH.onError(new AppCloudError(paramAppCloudResponse.getHTTPResponseCode(), paramAppCloudResponse.getResponseMessage()));
      return;
    }
    this.dH.onError(new AppCloudError(400, "Bad response"));
    Log.e("AppCloudObject", "getObjectById: response = null");
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.bn
 * JD-Core Version:    0.6.2
 */